<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ko">
<head>
<title>체크박스에 적용</title>
<meta name="class-lists" content="jindo.CheckBox"/>
<meta name="screenshots" content=""/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="description" content="체크박스에 적용한 예제입니다.">
<link rel="stylesheet" type="text/css" href="../asset/demo.css">
<style type="text/css">
	.checkbox-applied {display:-moz-inline-block; display:-moz-inline-box; display:inline-block; overflow:hidden; position:relative; width:24px; height:24px; vertical-align:middle;}
	.checkbox-applied span.checkbox-mark {display:-moz-inline-block; display:-moz-inline-box; display:inline-block; position:absolute; left:1px; top:1px; z-index:1; width:22px; height:22px; background:url("img/CheckBox.radio_check.gif") no-repeat -32px 0;}
	.checkbox-applied span.checkbox-mark.checkbox-checked {background-position:-32px -31px;}
	.checkbox-applied input {position:absolute; left:-9999px;}
	.checkbox-applied.checkbox-disabled span.checkbox-mark {background-position:-32px -62px;}
	.checkbox-applied.checkbox-disabled span.checkbox-mark.checkbox-checked {background-position:-32px -93px;}
</style>
</head>
<body>
<script type="text/javascript" src="../asset/demojs/demo.js#header"
     data-title="Jindo Component"
     data-subtitle="=document.title"
     data-backbutton="false"
     data-viewsource="false"
     data-qrcode="true"></script>
	
<div class="demo">
	<span class="ajax_checkbox"><span class="checkbox-mark"></span><input type="checkbox" name="c" id="c1" /></span> <label for="c1">첫번째</label>
	<span class="ajax_checkbox"><span class="checkbox-mark"></span><input type="checkbox" name="c" id="c2" /></span> <label for="c2">두번째</label>
	<span class="ajax_checkbox"><span class="checkbox-mark"></span><input type="checkbox" name="c" id="c3" checked="checked" /></span> <label for="c3">세번째(해제할 수 없음)</label>
	<span class="ajax_checkbox"><span class="checkbox-mark"></span><input type="checkbox" name="c" id="c4" checked="checked" /></span> <label for="c4">네번째</label>

	<br /><br />
	<span class="ajax_checkbox"><span class="checkbox-mark"></span><input type="checkbox" name="d" id="c5" disabled="disabled" /></span> <label for="c5">비활성 첫번째</label>
	<span class="ajax_checkbox"><span class="checkbox-mark"></span><input type="checkbox" name="d" id="c6" disabled="disabled" checked="checked" /></span> <label for="c6">비활성 두번째</label>
</div>

<script type="text/javascript" charset="utf-8" src="../../asset/jindo.desktop.all.ns.js"></script>
<script type="text/javascript" charset="utf-8" src="../../source/jindo.Component.js"></script>
<script type="text/javascript" charset="utf-8" src="../../source/jindo.UIComponent.js"></script>
<script type="text/javascript" charset="utf-8" src="../../source/jindo.HTMLComponent.js"></script>
<script type="text/javascript" charset="utf-8" src="../../source/jindo.CheckBox.js"></script>
<script type="text/javascript">
	var aCheckBox = jindo.CheckBox.factory(jindo.$$('.ajax_checkbox'), { sClassPrefix : 'checkbox-' });
			
	//세번째 체크박스는 항상 체크되도록 (수정할 수 없음)
	aCheckBox[2].attach("beforeChange", function(oCustomEvent){
		this.setChecked(true);
		oCustomEvent.stop();
	});
</script>
<script type="text/javascript" src="../asset/demojs/demo.js#footer"></script>
</body>
</html>